<!--
  Generated template for the ProfilePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-content>
  <ion-item class="profile-avatar">
    <ion-avatar item-start>
      <img src="http://ojg32ej8x.bkt.clouddn.com/app/bcb839be-fc10-4b36-9092-9926c78a88c4.png">
    </ion-avatar>
    <span>{{profile.accountName}}</span>
  </ion-item>

  <ion-item-group *ngIf="profile.type">
    <ion-item-divider color="light"></ion-item-divider>
    <button ion-item (click)="customerManage()">
      <ion-icon color="primary" name="logo-github" item-start></ion-icon>
      <ion-label>客户管理</ion-label>
    </button>
    <button ion-item (click)="agencyManage()">
      <ion-icon color="primary" name="logo-github" item-start></ion-icon>
      <ion-label>代理商管理</ion-label>
    </button>
  </ion-item-group>

  <ion-item-group>
    <ion-item-divider color="light"></ion-item-divider>
    <ion-item>
      <ion-icon color="primary" name="leaf" item-start></ion-icon>
      <ion-label>到期时间</ion-label>
      <ion-note item-end>{{profile.deadline}}</ion-note>
    </ion-item>
    <button ion-item (click)="changePwd()">
      <ion-icon color="primary" name="logo-github" item-start></ion-icon>
      <ion-label>重置密码</ion-label>
    </button>
  </ion-item-group>

  <ion-item-group>
    <ion-item-divider color="light"></ion-item-divider>
    <button ion-item (click)="openProjects('http://www.jingtanfkyy.com/jsfx.dhtml')">
      <ion-icon color="primary" name="alert" item-start></ion-icon>
      <ion-label>官方通知</ion-label>
    </button>
    <button ion-item (click)="openProjects('http://www.jingtanfkyy.com/disclaimer.dhtml')">
      <ion-icon color="primary" name="leaf" item-start></ion-icon>
      <ion-label>免责申明</ion-label>
    </button>
    <button ion-item (click)="openSystemBrower('http://ojg32ej8x.bkt.clouddn.com/product/android-debug.apk')">
      <ion-icon color="primary" name="alert" item-start></ion-icon>
      <ion-label>当前版本
        <ion-note>{{version}}</ion-note>
      </ion-label>
      <ion-note item-end>检查更新</ion-note>
    </button>
  </ion-item-group>

  <button style="width: 90%;margin: 20px auto 0;" (click)="singOut()" ion-button block>退出登录</button>

</ion-content>
